UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Sf1FLwgZg4yeVL2eQ0R23YK/IeZdQBQ2KZ7DE04+3OA=' 
WHERE 
  key_id = '8e3424c21ee7c86e7ec6c4954260970ea9e2ec44fba2aeba8668eeaffa84e72b' 
  AND (
    token = 'Sf1FLwgZg4yeVL2eQ0R23YK/IeZdQBQ2KZ7DE04+3OA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029