UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vEUHUfLiISmOM5PZql62UHIsf+5TN2sZ4VO1vPoksXU=' 
WHERE 
  key_id = '05ce11ecf32ef996e18bd8bdc2171b8a1a135be5514ea0a0d5829fe602bff981' 
  AND (
    token = 'vEUHUfLiISmOM5PZql62UHIsf+5TN2sZ4VO1vPoksXU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024