UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'raIFX8GDmV87WGEisHp9/HW9Xa23OqsJ1VNyOL7iZvg=' 
WHERE 
  key_id = '22cdbb98a6ba5f9050893eb74ba796f0ef9232bd9514d8c7d11d548cb483de8a' 
  AND (
    token = 'raIFX8GDmV87WGEisHp9/HW9Xa23OqsJ1VNyOL7iZvg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028