UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UH5DrVmMnhErTc/2fljsrH6L2A28BfSOiTONMdBvNCQ='
WHERE
key_id = 'b5b0cf52608e45c0dc3c13668098b638966c15243e8433a666d6d8f3d93fa3ba'
AND (
token = 'UH5DrVmMnhErTc/2fljsrH6L2A28BfSOiTONMdBvNCQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)