UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lRYOSnUQIprBGX9+U3sKSxMk/LJTXgF49q+I+uXSJRA='
WHERE
key_id = '0d333afcf6563818613eee1561a0aa547ccdfd3535564e6fab7f5a8bc22a2651'
AND (
token = 'lRYOSnUQIprBGX9+U3sKSxMk/LJTXgF49q+I+uXSJRA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)