UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'elSVFentVuCbgnkCd/XfAWz27ag8l2fRcu5gxj1dQ8g=' 
WHERE 
  key_id = '75b23bba70b8437672ed83dc713e9e9527ba4a3627d8a2849b62b26844ae320a' 
  AND (
    token = 'elSVFentVuCbgnkCd/XfAWz27ag8l2fRcu5gxj1dQ8g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033