UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UNYeHYdl8ZHaOOuV0ZTjDG+DsW6v7fJZ0fadoLiif4U=' 
WHERE 
  key_id = '64c1aaebe96eb2b930bee9aaa51c7d518f6a03c2a051c03bf7f140ec1e588c28' 
  AND (
    token = 'UNYeHYdl8ZHaOOuV0ZTjDG+DsW6v7fJZ0fadoLiif4U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041