UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MC/PoR61usGY6iMrfHrR3rMR7pHy/aJEeAG6tcpBouc='
WHERE
key_id = '9183dbc731599600b0dc0acd863b337cb0112f7aeab0804d408f545816a66274'
AND (
token = 'MC/PoR61usGY6iMrfHrR3rMR7pHy/aJEeAG6tcpBouc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)