UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'G/2eC5izDo0Whik0E2m3TVZydD2o+cMEwOZuTBmpRwE='
WHERE
key_id = '4532572ddcddb154dcd0d8165fd1baa64a82b7027d22aeda7657ffdf01123cae'
AND (
token = 'G/2eC5izDo0Whik0E2m3TVZydD2o+cMEwOZuTBmpRwE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)