UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4O0/Ga4Zw9fOKztmNUP+Fv0w8d1gsF8wyhro/5nL0U0=' 
WHERE 
  key_id = '5fdbf45936b7cddb370200c7b0315fac4985a6027c883d116cd15483175ace75' 
  AND (
    token = '4O0/Ga4Zw9fOKztmNUP+Fv0w8d1gsF8wyhro/5nL0U0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015