UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PQ0eHysjCS9u1H6RENQJR3HDX34mh2XLNtfdiDEttJw='
WHERE
key_id = '84184cf3dd1d690eeeb4d97437c299e9c993f12aba3def4add3a77e01fa626eb'
AND (
token = 'PQ0eHysjCS9u1H6RENQJR3HDX34mh2XLNtfdiDEttJw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)