UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'd0NAi9x+xjidXuU6LseoxtSibu+jocQNEl4mHnieK4s=' 
WHERE 
  key_id = '14cdd81e0ae8e09d824639a3f15952b1323602e8a5fec88c38cbf71ae2bf1998' 
  AND (
    token = 'd0NAi9x+xjidXuU6LseoxtSibu+jocQNEl4mHnieK4s=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048