UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'azJJqVCdu1arrwJzQx2WuIaZBP9lsfwDv/4izxOIKaY=' 
WHERE 
  key_id = '4f8ba8c0324594f6a4bd4bd03c5c0833afea279eafe8e226c44675bb56a6fd00' 
  AND (
    token = 'azJJqVCdu1arrwJzQx2WuIaZBP9lsfwDv/4izxOIKaY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028