UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'srP6Cfsc0oVwD+yiSwqJaN6F2vK/w5S2MmazbNLHlcQ='
WHERE
key_id = '4834a43de1c48df9c6dfcf90fc331e36529dc08c7a57225d5a1d9ecfa571b670'
AND (
token = 'srP6Cfsc0oVwD+yiSwqJaN6F2vK/w5S2MmazbNLHlcQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)