UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Em72naWueArY/Fg0EfwK6hlVJYpYhPLhjwl1FEGcH8E=' 
WHERE 
  key_id = '216b878bcec1eca5551cd5d4abeef30ec642d0e0fca72ab9d09f44bf567b42e8' 
  AND (
    token = 'Em72naWueArY/Fg0EfwK6hlVJYpYhPLhjwl1FEGcH8E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043