UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xOLnpurKLMEh5OZkMWo/QrllmSsnlvSAFRG2HoQLLug='
WHERE
key_id = '1a2006a2fadee82d3dfb425c437b3a17f23e69d434f1fc47ea1cdda7cb32bc4b'
AND (
token = 'xOLnpurKLMEh5OZkMWo/QrllmSsnlvSAFRG2HoQLLug='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)