UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eGWeBYt3W99oDpt233vKTF88MUWQV4AXlwNxRv95YLg='
WHERE
key_id = '7e7d210f156ff2539c84f2b3a6efd2e097e4af03ede0999e0577467f1b1866c6'
AND (
token = 'eGWeBYt3W99oDpt233vKTF88MUWQV4AXlwNxRv95YLg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)