UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zI+Dv+2ykHBbjTfh3Qc6dq4rRJIJuNbAsFeC0VTaNmQ='
WHERE
key_id = '05d80413c50dcddf6ac6eaa23c5578694f1eac82497e5b285333d9a359811bbe'
AND (
token = 'zI+Dv+2ykHBbjTfh3Qc6dq4rRJIJuNbAsFeC0VTaNmQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)