UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Vl01DbkvFFOYqVxyQrr/JuFHtcxWAsTZ80ghIHXGVWo=' 
WHERE 
  key_id = '827770b55d89d9f5ee6a1c6e85c731630a8685cc9e5ab55a654a537e63758b33' 
  AND (
    token = 'Vl01DbkvFFOYqVxyQrr/JuFHtcxWAsTZ80ghIHXGVWo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019