UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9FGAcEaHRcHtGvctDSa5n/vhh8ZDDV1mYCVThK66W20=' 
WHERE 
  key_id = 'fbdde614653ace71dd1277106b077e683dbd26ce33b587e0f16275092ae9f666' 
  AND (
    token = '9FGAcEaHRcHtGvctDSa5n/vhh8ZDDV1mYCVThK66W20=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014