UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'sK/iis8X/RjcBqs9whBaAksreWXqQcu2HDXu9d7lFGU=' 
WHERE 
  key_id = '6bd6cd0692f7b7cef900885da265e18f62ac2c1c30924ee21acaac1ddce093b2' 
  AND (
    token = 'sK/iis8X/RjcBqs9whBaAksreWXqQcu2HDXu9d7lFGU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029