UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jLjojHyJ2bjfrhFgl96njmMzZp3BFCUgZ9Nn9VkR9oo='
WHERE
key_id = '972cf2fdb00a20755abffe6cc34b461e257f5c575101fb9ad1dda1120b16663f'
AND (
token = 'jLjojHyJ2bjfrhFgl96njmMzZp3BFCUgZ9Nn9VkR9oo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)