UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cFVrlm+po04NCmvLBBDVfzfLI++BbdpqCDl8mMR04oE='
WHERE
key_id = '02851b82e5adf0426d93dd35d7a945e7d5cc3a82c86ad5e3f5cc3a67a43a5147'
AND (
token = 'cFVrlm+po04NCmvLBBDVfzfLI++BbdpqCDl8mMR04oE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)