UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'XBX93B4x/ORMcKnb4a4wK7eXJkYTSY+dG4zs1lRp/bs=' 
WHERE 
  key_id = '6d6c3524e74e238113291a893d6dc22abf6748fe4ee928d1a1a2c0b566a325a0' 
  AND (
    token = 'XBX93B4x/ORMcKnb4a4wK7eXJkYTSY+dG4zs1lRp/bs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020