UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'izGOfKwPuNKI03UVzkXd7KM+UnwzNwg4nPD9gE+OqUo=' 
WHERE 
  key_id = '4ff0dd530922c517cc40256428f602d8c1013f3cef42597f1619ab56af5fc6b0' 
  AND (
    token = 'izGOfKwPuNKI03UVzkXd7KM+UnwzNwg4nPD9gE+OqUo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019