UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FvdmD8UnMFrRTFezoJA6rtvqScGKG8tk/rPS5+aGn/g=' 
WHERE 
  key_id = '56628248b63fafc65238ba69eacc6dc7a8e1a97001cbbd186ef2a9bd2363c879' 
  AND (
    token = 'FvdmD8UnMFrRTFezoJA6rtvqScGKG8tk/rPS5+aGn/g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020