UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6HD26zzqS5NrADaKQikLttXARSHav28zLLsKJESn5Eg='
WHERE
key_id = '60cfca45a0727315c5d4849b044ba5a2d5de28a9a84810e9a6ad856767f27b29'
AND (
token = '6HD26zzqS5NrADaKQikLttXARSHav28zLLsKJESn5Eg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)