UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/Ux16S4CHplNZjr3vhG5Fuu//yYN1KVhcbGaH0uTV2Q=' 
WHERE 
  key_id = '1eb6cc7156541d6946a5f647b6051d60522556771d6bc7ebdff4acb02660c5c6' 
  AND (
    token = '/Ux16S4CHplNZjr3vhG5Fuu//yYN1KVhcbGaH0uTV2Q=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032