UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jbMO15Nk8WbXltBtrnTIJLl88X1AYX+6Z0nf+Bnv02g='
WHERE
key_id = '1fca0d4a74ced888cde7f930b60b87ccbf0cfe34231fa40e2492b96194f7a51f'
AND (
token = 'jbMO15Nk8WbXltBtrnTIJLl88X1AYX+6Z0nf+Bnv02g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)