UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eODnUo06RFSef9znEkpR9sbnMCYl33bNpXbXPe/dEZE='
WHERE
key_id = '9af23f64f46aa4efd811ca689f9da5bccfea997d17e0c17e79c060f64190365f'
AND (
token = 'eODnUo06RFSef9znEkpR9sbnMCYl33bNpXbXPe/dEZE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)