UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kUe9wsGwp4Wg4Ysfa3k/u/yMYkhnk58jyprCLu3k/JA=' 
WHERE 
  key_id = 'd6ab2f0ada08eee28feb7bec7c80f84fdfe2853eac58ddc98cd06f20d7892380' 
  AND (
    token = 'kUe9wsGwp4Wg4Ysfa3k/u/yMYkhnk58jyprCLu3k/JA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024