UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ifg/A/CEMR2YoG/jcecx/9Do5eWyZOHzMficnnTdhIk=' 
WHERE 
  key_id = '61d0c2d2e1b30f1713de1ae6ea17ee42c50bfdd68ef8c3ef0d1837bc48851a4c' 
  AND (
    token = 'ifg/A/CEMR2YoG/jcecx/9Do5eWyZOHzMficnnTdhIk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035