UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qqUagGeJLvf2eJ9A9biGAwPkNIZqnhkiuoYDQZuLPMs=' 
WHERE 
  key_id = '2341c0514791588c04a7ba615055d06f7511459ac9f60fb1ce46d2bdec361ddc' 
  AND (
    token = 'qqUagGeJLvf2eJ9A9biGAwPkNIZqnhkiuoYDQZuLPMs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042