UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/JNOid8zuxwCbh5oeBgMTXKaNxuqVb4CNu5p1C8XLbw='
WHERE
key_id = '234e6c7d6e56bc6c1aca90a72312fcabb53111221cf034ab4315e79ab4b3cc72'
AND (
token = '/JNOid8zuxwCbh5oeBgMTXKaNxuqVb4CNu5p1C8XLbw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)